home *** CD-ROM | disk | FTP | other *** search
/ BMUG Revelations / BMUG Revelations.toast / Programming / Programming Utilities / THINK Back cdev 1.0.1 / Read Me < prev    next >
Encoding:
Text File  |  1992-02-08  |  4.6 KB  |  81 lines  |  [TEXT/SNTE]

  1. THINK Back 1.0.1
  2.  
  3. Copyright © 1991,1992 Phil Shapiro
  4. All Rights Reserved
  5.  
  6. Description
  7.  
  8. This Extension enables you to compile in the background using THINK C 5.0 or 4.0.5 under System 7.0. If THINK C finishes compiling while it's in the background, the Notification Manager will be used to tell you that it's done.
  9.  
  10. Installation and Use
  11.  
  12. Drop THINK Back in your Extensions folder and restart. To start a backgroundable compile, hold down the shift key when choosing any THINK C action that will cause a source file to be compiled. THINK Back will change the compiler's progress dialog to a movable modal dialog box if it's active. For example, if you bring up the Make dialog box and hold down the shift key while clicking on the Make button, THINK Back will be activated. It will also be activated if you press command-shift-U instead of just command-U (Bring up to date). You can use command-period to cancel a compile as usual. THINK Back will refuse to install itself if any of its needed resources are missing, or if you try to use it under System 6.
  13.  
  14. Customizing
  15.  
  16. There's no Control Panel interface for this yet, so you'll have to use ResEdit if you want to customize THINK Back's behavior. You can edit the PREF resource using the template provided. You can change:
  17.  
  18.     • The number of ticks that THINK C passes to WaitNextEvent when it's in the
  19.     foreground or background. Using this, you can fine-tune it's performance on
  20.     your machine. The default settings (5 ticks in the foreground, 15 in the
  21.     background) should provide good performance on a IIsi.
  22.  
  23.     • If THINK Back is on or off by default. If it's on by default, then you can
  24.     disable it by holding down the shift key when starting a compile. If it's off
  25.     by default, then THINK Back will not be activated unless you hold down the
  26.     shift key when starting a compile. The default setting is off by default.
  27.  
  28.     • The "level" of notification. There are four settings:
  29.  
  30.         0 - no notification at all
  31.         1 - mark THINK C in the application menu with a diamond
  32.         2 - mark THINK C and display a rotating THINK C icon in the Application menu
  33.         3 - mark THINK C, display a rotating icon, and present an alert letting you know
  34.         that C is finished compiling
  35.  
  36.     The default setting is level 2.
  37.  
  38. If you change the PREF resource, changes will take effect the next time you boot your Macintosh.
  39.  
  40. How it works
  41.  
  42. At INIT time, THINK Back installs a global head patch on the _GetNewDialog trap. This trap watches each call to GetNewDialog and looks for the THINK C Progress dialog box. When it sees this dialog, it installs a number of other patches local to THINK C, one of which calls WaitNextEvent. When the compile is finished, all of the installed patches are removed (except the one on _GetNewDialog). The code is loaded low in the System heap, and it plus its data take up less than 2K.
  43.  
  44. Bugs/Odd Features
  45.  
  46. Since the same dialog is used for different things in THINK C, this patch will also background Multi-File Search, Precompile, Check Syntax, Disassemble and Preprocess -- this should not cause any problems, but these "features" have not been tested.
  47.  
  48. If THINK Back causes a "hang" when you bring THINK C to the front, you can safely use a low-level debugger to perform an ExitToShell on THINK C's heap. This should not damage your project. After doing this, you will need to reboot to use THINK Back again. The problem that caused 1.0 to hang has been found, and you shouldn't have any problems with later versions hanging.
  49.  
  50. Credits
  51.  
  52. ShowIconFamily by Patrick C. Beard
  53. StartupError by joe holt
  54.  
  55. Version History
  56.  
  57. 1.0.1 - calls WaitNextEvent less often when THINK C is in the foreground. When
  58.            it's placed in the background, WaitNextEvent is called as often as before.
  59.          - disallows reentrant use (you can't background two compiles at the same time)
  60.          - disables CMaster's menu (if present) during compiles
  61.          - uses a much more reliable method to tell if THINK C is in the background or
  62.             not. This fixes the bug where THINK C would hang after switching it in & out.
  63.          - multi-file searches are backgroundable now as well.
  64. 1.0 - finalized 12/18/91; identical to version 1.0b4
  65.  
  66. Future enhancements
  67.     • Use the Time Manager to regulate how much CPU time THINK C takes up
  68.     • Save the Progress window's position between compiles and between launches
  69.     • Custom sound when a compile is finished
  70.     • Customize toggle key modifiers
  71.     • Control Panel interface for preferences
  72.     • Implement same idea for THINK Pascal
  73.  
  74. Please contact me if you find any bugs, or have any suggestions for improvement. Thanks for all the positive feedback that I've gotten!
  75.  
  76. Phil Shapiro
  77.  
  78. Internet: phils@chaos.cs.brandeis.edu
  79. Postal:
  80. 70 Simpson Ave.
  81. Somerville, MA 02144